from requests import get


def get_weather(location_id, weather_key):
    weather_url = "https://devapi.qweather.com/v7/weather/3d?location={}&key={}".format(location_id, weather_key)
    response = get(weather_url).json()
    today = response['daily'][0]

    weather = today['textDay']
    temp_min_max = f"{today['tempMin']}~{today['tempMax']}" + u"\N{DEGREE SIGN}" + "C"
    wind_dir = today["windDirDay"]

    return weather, temp_min_max, wind_dir
